import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'

// 引入三个小模块
import app from './modules/app'
import settings from './modules/settings'
import user from './modules/user'

Vue.use(Vuex)

const store = new Vuex.Store({
  modules: {
    app,
    settings,
    user
  },
  // 根模块里面加的 getters 的作用：建立对子模块的快捷访问
  getters
})

export default store
